#include <iostream>
#include <vector>

int main()
{
    std::vector<int> vec (10, 42);
    for (auto it = vec.begin(); it != vec.end(); it++)
        *it *= 2;
    for (auto it = vec.begin(); it != vec.end(); it++)
        std::cout << *it << " " << std::ends;
}